<?php $this->load->view('teacher_home/_header') ?>
<?php $this->load->view('message') ?>

<script tyep="text/javascript">
	$().ready(function(){
		$("#student_li").addClass("active"); 
	});
	function delete_logic_class(logic_class_id)
	{
		if(confirm("删除后将删除所有学生的选课信息，不可恢复，确定吗？"))
			location.href="<?php echo site_url('teacher_student/logic_class_delete') . '/' ?>"+logic_class_id;
	}
</script>

<div class="container">
	<div class="panel panel-primary">
		<div class="panel-heading">
			<h3 class="panel-title">我的班级</h3>
		</div>
		<div class="panel-body">
			<div class="panel-body">
	            <div id="table">
	                <table class="table table-striped table-hover ">
	                    <thead>
	                        <tr>
	                            <th>序号</th>
	                            <th>班级名称</th>
	                            <th>课程名称</th>
	                            <th>有效期</th>
	                            <th>操作</th>
	                            <th><a href="<?php echo site_url('teacher_student/logic_class_add') ?>" class="btn btn-primary">添加班级</a></th>
								<th><a href="<?php echo site_url('teacher_student/add') ?>" class="btn btn-primary">添加学生</a></th>
	                        </tr>
	                    </thead>
	                    <tbody>
	                        <?php $index = 1;
																								foreach ($logic_classes as $item) : ?>
	                        <tr>
	                            <td>
	                                <?php echo $index++ ?></td>
	                            <td>
	                                <?php echo $item['name'] ?></td>
								<td>
	                                <?php echo $item['big_lecture_name'] ?></td>
	                            <td>
	                                <?php echo $item['start_date'] ?>—<?php echo $item['end_date'] ?></td>
	                            <td>
	                                <a href="<?php echo site_url('teacher_student/check_logic_class') . '/' . $item['id'] ?>">查看</a>
	                            </td>
	                            <td>
	                                <a onclick="delete_logic_class(<?= $item['id'] ?>)" href="#">删除</a>
	                            </td>
	                        </tr>
	                    <?php endforeach; ?></tbody>
	                </table>
	            </div>

        	</div>
		</div>
	</div>
</div>




<?php $this->load->view('teacher_home/_footer') ?>